package com.hualan.web.wsj;

import com.hualan.service.service.service.wsj.FmService;
import com.hualan.util.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/fm")
public class FmController {
    @Autowired
    private FmService fmService;

    @RequestMapping("/listAll")
    public ResultEntity listAll() {
        return ResultEntity.ok(fmService.listAll());
    }

    @RequestMapping("/listType")
    public ResultEntity listType() {
        return ResultEntity.ok(fmService.listType());
    }

    @RequestMapping("/listByType")
    public ResultEntity listByType(Integer typeId) {
        return ResultEntity.ok(fmService.listByType(typeId));
    }
}
